using B.S.NewMedical.ErrorCode;
using MediatR;

namespace B.S.NewMedical.Api.Write.Application.Command.Doctor
{
    /// <summary>
    /// 开处方命令
    /// </summary>
    public class AddPrescriptionCommand : IRequest<ApiResult<int>>
    {
        /// <summary>
        /// 就诊ID
        /// </summary>
        public int VisitId { get; set; }

        /// <summary>
        /// 处方类型：西药/中成药
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 处方明细
        /// </summary>
        public List<PrescriptionItemDto> Items { get; set; } = new List<PrescriptionItemDto>();
    }

    /// <summary>
    /// 处方明细DTO
    /// </summary>
    public class PrescriptionItemDto
    {
        /// <summary>
        /// 药品编码
        /// </summary>
        public string DrugCode { get; set; }

        /// <summary>
        /// 药品名称
        /// </summary>
        public string DrugName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string Spec { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Qty { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 天数
        /// </summary>
        public int Days { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
    }
} 